package my.graduation.controller.patient;

import my.graduation.dto.PatExamScheDto;
import my.graduation.dto.PatRegScheDto;
import my.graduation.entity.ExaminationSpots;
import my.graduation.entity.RegistrationSpots;
import my.graduation.result.Result;
//import my.graduation.service.ExaminationScheduleService;
import my.graduation.service.ExaminationScheduleService;
import my.graduation.service.ExaminationSpotsService;
import my.graduation.service.RegistrationScheduleService;
import my.graduation.service.RegistrationSpotsService;
import my.graduation.vo.DoctorExamVO;
import my.graduation.vo.DoctorRegVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: RavenLyn
 * @Date: 2025-02-27
 */
@RestController
@RequestMapping("/patient")
public class ExaminationController {

    @Autowired
    private ExaminationScheduleService examScheService;

    @Autowired
    private ExaminationSpotsService examSpotsService;

    /**
     * 根据日期获取该门诊下的医生检查排班
     * @param dto
     * @return
     */
    @PostMapping("/exam_sche")
    public Result<List<DoctorExamVO>> patientGetExamScheList (@RequestBody PatExamScheDto dto){
        return examScheService.patientGetExamScheList(dto);
    }

    /**
     * 根据examScheId获取医生检查预约号源
     * @param dto
     * @return
     */
    @PostMapping("/exam_spots")
    public Result<List<ExaminationSpots>> patientGetExamSpotsList (@RequestBody PatExamScheDto dto){
        return examSpotsService.patientGetExamSpotsList(dto);
    }
}
